/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 阿宾
 * Date: 2025-02-27
 * Time: 20:05
 */
public class Test03 {


    public static String myToString(int[] arr){
        String s = "[";
        for (int i = 0; i < arr.length; i++) {
            s += arr[i];
            if(i < arr.length-1){
                s += ",";
            }
        }
        s += "]";
        return s;
    }

    public static void main(String[] args) {
        int[] arr  = {1,2,3,4,5};
        String s = myToString(arr);
        System.out.println(s);

    }
}
